package com.hxzy.controller.mobile.category;

import com.hxzy.common.annotates.StpMobileCheckLogin;
import com.hxzy.common.resp.R;
import com.hxzy.controller.mobile.category.resp.MobileCategoryClassResp;
import com.hxzy.service.CategoryClassService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author wy
 * @Description TODO
 * @Date 2024/1/17 10:40
 * @Version 1.0
 */
@RestController
@RequestMapping(value = "/mobile/category")
@Api(tags = "手机-商家分类API")
@StpMobileCheckLogin
public class MobileCategoryController {

    @Autowired
    private CategoryClassService  categoryClassService;


    @ApiOperation(value = "商家分类列表")
    @GetMapping(value = "/list/{merchantId}")
    public R<List<MobileCategoryClassResp>>  mobileList(@PathVariable(value = "merchantId") Long merchantId){
        List<MobileCategoryClassResp> list=  this.categoryClassService.mobileList(merchantId);
        return R.okHasData(list);
    }




}

